package com.dlc.shop.sms4j.dao;

import com.dlc.shop.common.util.RedisUtil;
import org.dromara.sms4j.api.dao.SmsDao;

/**
 * 自定义smsDao缓存
 * @author zp
 */
public class BizSmsDao implements SmsDao {

    @Override
    public void set(String key, Object value, long cacheTime) {
        RedisUtil.set(key, value, cacheTime);
    }

    @Override
    public void set(String key, Object value) {
        // 默认保存时间为1分钟
        RedisUtil.set(key, value, 60);
    }

    @Override
    public Object get(String key) {
        return RedisUtil.get(key);
    }

    @Override
    public Object remove(String key) {
        RedisUtil.del(key);
        return null;
    }

    @Override
    public void clean() {
    }
}
